using UnityEngine;
using System.Collections;


public class UnitStatus : MonoBehaviour
{
	public UnitData m_unitData;
	public WeaponData m_WeaponData;


	void Start()
	{
       // if(gameObject.GetComponent<StateMachine>().m_iUnitType == UNIT_TYPE.ENEMY)
		
        
        if(gameObject.tag == "Enemy")
            m_unitData.SetRandSpeed ();
        else
            m_unitData.objNameTag = ResourceMgr.GetInstance().CreateNameTag(gameObject);

		m_unitData.UnitData_Init ();
		m_WeaponData.Reload ();

        

		//gameObject.GetComponent<UnitScript> ().SetAnimator ();
	}

	void Update()
	{
        
	}

    public int Get_AcuurStat()
    {
        return (m_unitData.iAccur + m_WeaponData.m_iWeaponAccur);
    }
}